package com.hospital.hospitalpatientservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 患者表; InnoDB free: 4096 kB; (`source_id`) REFER `hospital/source`(`id`); (`marita
 * </p>
 *
 * @author handingfei
 * @since 2020-10-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sickperson")
public class Sickperson implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 患者姓名
     */

    private String name;

    /**
     * 患者卡号
     */

    private String serialnumber;

    /**
     * 年龄
     */

    private Integer age;

    /**
     * 出生日期
     */

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birth;

    /**
     * 性别0女1男
     */

    private Integer sex;

    /**
     * 手机号码
     */

    private String phone;

    /**
     * 证件号码
     */
    @TableField(value = "personid")
    private String personid;

    /**
     * 患者来源
     */
    @TableField(value = "source_id")
    private Integer sourceId;

    /**
     * 会员类型
     */
    @TableField(value = "vipgrade_id")
    private Integer vipgradeId;

    /**
     * 到期时间
     */

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date vipenddate;

    /**
     * 民族
     */

    private String nation;

    /**
     * 婚姻状态
     */
    @TableField(value = "vipgrade_id")
    private Integer maritalId;

    /**
     * 学历
     */
    @TableField(value = "education_id")
    private Integer educationId;

    /**
     * 省
     */

    private Integer province;

    /**
     * 市
     */
    @TableField(value = "city_id")
    private Integer cityId;

    /**
     * 详细地址
     */

    private String address;

    /**
     * 职业
     */
    @TableField(value = "work_id")
    private Integer workId;

    /**
     * 工作单位
     */

    private String workaddress;


    private String desc;


    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createtime;

    @TableField(value = "doctor_id")
    private Integer doctorId;


    private String vipname;
    private String viplevel;

    private String docname;

    /*时间区间*/
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date stime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date etime;

    private String sname;

    private String remarks;

    private Integer pid;
    private Integer cid;
    private Integer did;

    private Integer ssq;
    private Integer ssqs;
    private Integer ssqsprops;

    @TableField(value = "advice_id")
    private Integer adviceId;
    @TableField(value = "diagnosis_id")
    private Integer diagnosisId;

}
